home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20020314-20021006 / 000380_rgibbens@redskytech.com_Wed Sep 18 14:17:13 EDT 2002.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  62 lines

  1. Article: 13714 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!panix!howland.erols.net!newspeer.monmouth.com!solaris.cc.vt.edu!news.vt.edu!msunews!not-for-mail
  3. From: "Robert Gibbens" <rgibbens@redskytech.com>
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: Multiple line IF statement?
  6. Date: Wed, 18 Sep 2002 14:10:57 -0400
  7. Organization: Michigan State University
  8. Lines: 43
  9. Message-ID: <amafji$a5t$1@msunews.cl.msu.edu>
  10. References: <amadkm$8bh$1@msunews.cl.msu.edu> <amaf98$es6$1@watsol.cc.columbia.edu>
  11. NNTP-Posting-Host: 208.48.6.2
  12. X-AUTHid: gibbensr
  13. X-Priority: 3
  14. X-MSMail-Priority: Normal
  15. X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
  16. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
  17. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13714
  18.  
  19. Thanks, I read most of the chapter in my "Using C-Kermit Second Edition"
  20. book, but I didn't read anything about multi-line statements.  Thanks for
  21. the help, it was just what I needed.
  22.  
  23.  
  24. "Frank da Cruz" <fdc@columbia.edu> wrote in message
  25. news:amaf98$es6$1@watsol.cc.columbia.edu...
  26. > In article <amadkm$8bh$1@msunews.cl.msu.edu>,
  27. > Robert Gibbens <rgibbens@redskytech.com> wrote:
  28. > : Is it possible in C-Kermit (Kermit 95, Win2k), to do multiple line IF
  29. > : statements?
  30. > :
  31. > Sure.
  32. >
  33. > : For example, if I encounter a failure, I would like to write the failure
  34. to
  35. > : my log file and then exit.  When I try this....
  36. > :
  37. > :             if > \%a \%b -
  38. > :                  WRITE File \v(exitstatus) \v(date) \v(time) \%s FAILED
  39. > : after \%a tries, end 1
  40. > :
  41. > : ....it simply writes the whole line to the log file and then continues
  42. > : running the script.  I would like the "end 1" to execute also
  43. >
  44. > As described in the manual (second edition) and shown in the many sample
  45. > scripts in our script library:
  46. >
  47. >   http://www.columbia.edu/kermit/ckscripts.html
  48. >
  49. > if > \%a \%b {
  50. >     WRITE File \v(exitstatus) \v(date) \v(time) \%s FAILED after \%a tries
  51. >     end 1
  52. > }
  53. >
  54. > You can also have an ELSE part, and you can nest them, etc.  For details
  55. > about improved IF command syntax, see:
  56. >
  57. >   http://www.columbia.edu/kermit/ckermit70.html#x7.20
  58. >
  59. > - Frank
  60.  
  61.  
  62.